import java.lang.reflect.Array;
import java.util.InputMismatchException;
import java.util.Scanner;

public class Test {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        try{
            int a = scanner.nextInt();
            System.out.println(a);
        }catch(InputMismatchException e){
            e.printStackTrace();
            System.out.println("输入的数据有问题...");
        }finally {
            scanner.close();
        }
    }

    public static void main1(String[] args) {
        try{
            int [] array = {1,2,3};
            System.out.println(array[10]);

            System.out.println("hello");
        }catch(ArrayIndexOutOfBoundsException | NullPointerException e) {
            e.printStackTrace();
        }
//        }catch(ArrayIndexOutOfBoundsException e){
//            e.printStackTrace();
//            System.out.println("数组下标越界访问异常...");
//        }catch(NullPointerException e){
//            e.printStackTrace();
//            System.out.println("空指针异常...");
//        }

        System.out.println("程序继续执行...");
    }


}
